﻿<?php	
	include_once 'inc/tool.inc.php';
	$id = $_GET['id'];
	$msg = $_GET['msg'];
	if($msg == 'scenicinfo' && isset($msg) && isset($id) && is_numeric($id)){
		$template['title']='景点资讯';
	}else if($msg == 'travelInfo' && isset($msg) && isset($id) && is_numeric($id)){
		$template['title']='旅游信息';
	}else if($msg == 'travelStrategy' && isset($msg) && isset($id) && is_numeric($id)){
		$template['title']='旅游攻略';
	}else{
		skip('index.php','error','参数错误！');
	}

	include_once 'inc/header_inc.php';

	if($msg == 'scenicinfo'){
		$query="select * from infopage1 where id=".$id;
	}else if($msg == 'travelInfo'){
		$query="select * from infopage2 where id=".$id;
	}else if($msg == 'travelStrategy'){
		$query="select * from infopage3 where id=".$id;
	}
	$result=execute($link,$query);
	$data=mysqli_fetch_assoc($result);
	if(!mysqli_num_rows($result)){
		skip('scenicInfo.php','error','这条用户信息不存在！');
	}
	
?>
			<!-- 当前位置 -->
			<div class="loaction">
				<ol class="breadcrumb">
					<li><img src="img/location.gif" />当前位置:</li>
					<li><a href="index.php"> 首页 </a> >> <a href="<?php echo $_SERVER['REQUEST_URI'] ?>" class="active"><?php echo $data['title'] ?></a> </li>
					<div class="search">
						<form action="" method="post">
							<input type="text" placeholder="请输入关键字查询" name="search" class="form-control" />
							<input type="submit" class="btn btn-primary" value="搜索" />
						</form>
					</div>
				</ol>
			</div>

			<div id="main">
				<div id="three_main">
					
					<div class="three_title"><?php echo $data['title'] ?></div>
					<div class="title2">
						<span>新闻来源：</span><?php echo $data['author'] ?> 
						<span>发布日期：</span><?php echo $data['time'] ?>
					</div>
					<div class="three_content">
						<?php echo $data['content'] ?>
					</div>
					
				</div>

				<?php
					include 'inc/sidebar_inc.php';
				?>
			</div>
			<!-- 友情链接 -->
			<div class="friendly">
				<div class="silde">友<br/>情<br/>链<br/>接</div>
				<ul>
					
				</ul>
			</div>
		</div>
		<?php
			include 'inc/footer_inc.php';
		?>
		
	<script>
		share();
		nav();
	</script>